package cn.softgame.jserver.connector;

import cn.softgame.jserver.http.HttpWrapFactory;

/**
 * 数据包装工厂
 * 默认是使用HTTP协议包装数据,也可以拓展成其他协议
 * @author lenovo
 *
 */
public abstract class WrapFactory {
	private static WrapFactory factory = new HttpWrapFactory();
	public static WrapFactory getInstance(){
		return factory;
	}
	public abstract byte[] getRequest(byte[] bytes);
	public abstract byte[] getResponse(byte[] bytes);
	public abstract byte[] getContentFromRequest(byte[] bytes) throws Exception;
	public abstract byte[] getContentFromResponse(byte[] bytes) throws Exception;
}
